package com.shop.controller;

import com.shop.entity.Category;
import com.shop.service.CategoryService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;
import java.util.List;

/**
 * description: 前台用户展示商品
 *
 * @author zhaoxiaozhao（xiaozhao.zhao@ucarinc.com）
 * @version 1.0
 * @date 2018/10/17 10:04
 **/
@Controller
@RequestMapping("/sellerFornt")
public class SellerForntController {

    @Resource
    private CategoryService categoryService;
    /**
     * description:<前台用户展示页面>
     *
     * @author zhaoxiaozhao（xiaozhao.zhao@ucarinc.com）
     * @date   2018/10/17 10:06
     * @param  
     * @return 
     **/
    @RequestMapping("/index")
    public ModelAndView sellerIndex(){
        List<Category> categoryList = categoryService.findCategoryAll();
        ModelAndView model = new ModelAndView("index");
        model.addObject("categoryList",categoryList);
       return model;
    }
}
